<HTML> 
<HEAD> 
	<TITLE>3rd Party ROBOTC Drivers</TITLE> 
<link href="tabs.css" rel="stylesheet" type="text/css"/> 
<link href="doxygen.css" rel="stylesheet" type="text/css"/> 
</HEAD> 
 
<BODY bgcolor="#ffffff" link="#000000" vlink="#000000"> 
<table width="100%" bgcolor="navy" cellspacing=0 cellpadding=1 border=0> 
<tr><td><table width="100%" bgcolor="#EEEEDD" cellspacing=0 cellpadding=3 border=0> 
<tr> 
    <td width="33%" align="left"> <img src="images/LOGO_NXT.gif" width=266 height=44 border="0" alt="Mindstorms"></td> 
    <td><b><font size="+3" color="navy">3rd Party ROBOTC Drivers</font></b></td> 
    <td align="right"> <img src="images/logo.png" width=44 height=44 border="0" alt="RobotC"></td>     
</tr> 
  <tr bgcolor="#cccc99" align="right"> 
          <td colspan=3> <font face="arial" size="-1"> [<a href=main.html>Home</a>] [<a target=_top href="https://sourceforge.net/projects/rdpartyrobotcdr/">Download</a>] [<a target=_top href="http://apps.sourceforge.net/mantisbt/rdpartyrobotcdr/my_view_page.php">Submit a bug/suggestion</a>]  [<a target=_top href="http://www.robotc.net/forums/">ROBOTC Forums</a>] [<a target=_top href="http://botbench.com">Blog</a>] [<a target=_top href="http://sourceforge.net/donate/index.php?group_id=257238">Support this project</a>]</font> </td> 
</tr> 
</table></td></tr> 
</table> 
<!-- Generated by Doxygen 1.7.2 -->
<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<h1>Gyroscopic Sensor<br/>
<small>
[<a class="el" href="group___hi_technic.html">HiTechnic</a>]</small>
</h1>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="files"></a>
Files</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hitechnic-gyro_8h.html">hitechnic-gyro.h</a></td></tr>

<p><tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>HiTechnic Gyroscopic Sensor driver. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htgyro.html#gac5c75d104a9a3e21c833caffdc171453">HTGYROreadRot</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htgyro.html#gaf4a1eddf945fef43aa0cbf8936d8ffe3">HTGYROstartCal</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htgyro.html#ga9247fc100184132c0ae85edc4314fc40">HTGYROreadCal</a> (tSensors link)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htgyro.html#ga5ec2fe2a2d3645d036d1da99cf3e1f0a">HTGYROreadRot</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htgyro.html#ga1becfea33bb5565c3c98cd24de530eed">HTGYROstartCal</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htgyro.html#gaf35cbc215fee6fa125110a86fcd65bdc">HTGYROreadCal</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htgyro.html#gad83a2cb1bc55aca46a62d40fdbd3617e">HTGYROsetCal</a> (<a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a> muxsensor, int offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htgyro.html#gaf80a0125f81fb3effaa225e64d950295">HTGYROsetCal</a> (tSensors link, int offset)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__htgyro.html#gad214ac2d17245be4b3985ffad27b5de8">HTGYRO_offsets</a> [][]</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>HiTechnic Gyroscopic Sensor </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga9247fc100184132c0ae85edc4314fc40"></a><!-- doxytag: member="hitechnic&#45;gyro.h::HTGYROreadCal" ref="ga9247fc100184132c0ae85edc4314fc40" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float HTGYROreadCal </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Retrieve the current offset for the gyro </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTGYRO port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the offset value for the gyro </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-gyro-_s_m_u_x-test1_8c-example.html#a2">hitechnic-gyro-SMUX-test1.c</a>, and <a class="el" href="hitechnic-gyro-test1_8c-example.html#a1">hitechnic-gyro-test1.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-gyro_8h_source.html#l00176">176</a> of file <a class="el" href="hitechnic-gyro_8h_source.html">hitechnic-gyro.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf35cbc215fee6fa125110a86fcd65bdc"></a><!-- doxytag: member="hitechnic&#45;gyro.h::HTGYROreadCal" ref="gaf35cbc215fee6fa125110a86fcd65bdc" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float HTGYROreadCal </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Retrieve the current offset for the gyro </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the offset value for the gyro </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-gyro_8h_source.html#l00187">187</a> of file <a class="el" href="hitechnic-gyro_8h_source.html">hitechnic-gyro.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga5ec2fe2a2d3645d036d1da99cf3e1f0a"></a><!-- doxytag: member="hitechnic&#45;gyro.h::HTGYROreadRot" ref="ga5ec2fe2a2d3645d036d1da99cf3e1f0a" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float HTGYROreadRot </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read the value of the gyro </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the value of the gyro </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-gyro_8h_source.html#l00089">89</a> of file <a class="el" href="hitechnic-gyro_8h_source.html">hitechnic-gyro.h</a>.</p>

</div>
</div>
<a class="anchor" id="gac5c75d104a9a3e21c833caffdc171453"></a><!-- doxytag: member="hitechnic&#45;gyro.h::HTGYROreadRot" ref="gac5c75d104a9a3e21c833caffdc171453" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float HTGYROreadRot </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read the value of the gyro </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTGYRO port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the value of the gyro </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-gyro-_s_m_u_x-test1_8c-example.html#a3">hitechnic-gyro-SMUX-test1.c</a>, <a class="el" href="hitechnic-gyro-test1_8c-example.html#a2">hitechnic-gyro-test1.c</a>, and <a class="el" href="hitechnic-gyro-test2_8c-example.html#a1">hitechnic-gyro-test2.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-gyro_8h_source.html#l00072">72</a> of file <a class="el" href="hitechnic-gyro_8h_source.html">hitechnic-gyro.h</a>.</p>

</div>
</div>
<a class="anchor" id="gad83a2cb1bc55aca46a62d40fdbd3617e"></a><!-- doxytag: member="hitechnic&#45;gyro.h::HTGYROsetCal" ref="gad83a2cb1bc55aca46a62d40fdbd3617e" args="(tMUXSensor muxsensor, int offset)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void HTGYROsetCal </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Override the current offset for the gyro manually </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
    <tr><td class="paramname">offset</td><td>the new offset to be used </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="hitechnic-gyro_8h_source.html#l00165">165</a> of file <a class="el" href="hitechnic-gyro_8h_source.html">hitechnic-gyro.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf80a0125f81fb3effaa225e64d950295"></a><!-- doxytag: member="hitechnic&#45;gyro.h::HTGYROsetCal" ref="gaf80a0125f81fb3effaa225e64d950295" args="(tSensors link, int offset)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void HTGYROsetCal </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"> <em>offset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Override the current offset for the gyro manually </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTGYRO port number </td></tr>
    <tr><td class="paramname">offset</td><td>the new offset to be used </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="hitechnic-gyro_8h_source.html#l00153">153</a> of file <a class="el" href="hitechnic-gyro_8h_source.html">hitechnic-gyro.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaf4a1eddf945fef43aa0cbf8936d8ffe3"></a><!-- doxytag: member="hitechnic&#45;gyro.h::HTGYROstartCal" ref="gaf4a1eddf945fef43aa0cbf8936d8ffe3" args="(tSensors link)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float HTGYROstartCal </td>
          <td>(</td>
          <td class="paramtype">tSensors&#160;</td>
          <td class="paramname"> <em>link</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Calibrate the gyro by calculating the average offset of 5 raw readings. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">link</td><td>the HTGYRO port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the new offset value for the gyro </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="hitechnic-gyro-_s_m_u_x-test1_8c-example.html#a1">hitechnic-gyro-SMUX-test1.c</a>, <a class="el" href="hitechnic-gyro-test1_8c-example.html#a0">hitechnic-gyro-test1.c</a>, and <a class="el" href="hitechnic-gyro-test2_8c-example.html#a0">hitechnic-gyro-test2.c</a>.</dd>
</dl>
<p>Definition at line <a class="el" href="hitechnic-gyro_8h_source.html#l00100">100</a> of file <a class="el" href="hitechnic-gyro_8h_source.html">hitechnic-gyro.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga1becfea33bb5565c3c98cd24de530eed"></a><!-- doxytag: member="hitechnic&#45;gyro.h::HTGYROstartCal" ref="ga1becfea33bb5565c3c98cd24de530eed" args="(tMUXSensor muxsensor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float HTGYROstartCal </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__htsmux.html#gab5bad1759ac110c43e66c3ec54047f42">tMUXSensor</a>&#160;</td>
          <td class="paramname"> <em>muxsensor</em>&#160;)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Calibrate the gyro by calculating the average offset of 50 raw readings. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">muxsensor</td><td>the SMUX sensor port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the new offset value for the gyro </dd></dl>

<p>Definition at line <a class="el" href="hitechnic-gyro_8h_source.html#l00129">129</a> of file <a class="el" href="hitechnic-gyro_8h_source.html">hitechnic-gyro.h</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="gad214ac2d17245be4b3985ffad27b5de8"></a><!-- doxytag: member="hitechnic&#45;gyro.h::HTGYRO_offsets" ref="gad214ac2d17245be4b3985ffad27b5de8" args="[][]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float <a class="el" href="group__htgyro.html#gad214ac2d17245be4b3985ffad27b5de8">HTGYRO_offsets</a>[][]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment"> {{620.0, 620.0, 620.0, 620.0}, 
                          {620.0, 620.0, 620.0, 620.0},
                          {620.0, 620.0, 620.0, 620.0},
                          {620.0, 620.0, 620.0, 620.0}}
</pre></div>
<p>Definition at line <a class="el" href="hitechnic-gyro_8h_source.html#l00062">62</a> of file <a class="el" href="hitechnic-gyro_8h_source.html">hitechnic-gyro.h</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 13 2013 19:56:44 for ROBOTC Drivers by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
